package com.onenine.app.adapter;

import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.onenine.app.R;
import com.onenine.app.model.InviteMsgItem;
import com.onenine.app.utils.GlideUtils;
import com.onenine.chat.util.SimpleCommonUtils;

public class InviteMsgAdapter extends BaseQuickAdapter<InviteMsgItem, BaseViewHolder> {

    public InviteMsgAdapter() {
        super(R.layout.layout_msg_invite_item);
    }

    @Override
    protected void convert(final BaseViewHolder holder, final InviteMsgItem msgItem) {
        GlideUtils.loadSrcImage(mContext, holder.getView(R.id.niv_avatar), msgItem.getPhoto());
        holder.setText(R.id.tv_name, msgItem.getNickName()).setText(R.id.tv_date, msgItem.getDate());
        TextView tvContent = holder.getView(R.id.tv_src_content);
        SimpleCommonUtils.spannableEmoticonFilter(tvContent
                , msgItem.getDescriptionContent());
    }

}
